FROM python:3.10-slim
WORKDIR /code
COPY . /code

# 设置时区
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# 设置环境变量
RUN export DB_HOST="192.168.1.4"
RUN export DB_PORT=5432
RUN export REDIS_HOST="192.168.1.4"
RUN export REDIS_PORT="6379"

RUN pip install -r /code/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
